package org.nanotek.tika.tests.index;

import java.io.IOException;
import java.util.Date;
import java.util.List;

import org.apache.lucene.document.Document;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TopDocs;
import org.nanotek.cms.domain.lucene.FieldStat;
import org.nanotek.cms.domain.lucene.Index;
import org.nanotek.cms.domain.lucene.ScoreDocument;
import org.nanotek.cms.domain.lucene.TermStats;
import org.nanotek.lucene.IndexConfig;
import org.nanotek.lucene.index.search.IndexSearchService;
import org.nanotek.lucene.index.search.IndexType;
import org.nanotek.lucene.query.ContextKeys;
import org.nanotek.lucene.query.QueryContext;
import org.nanotek.lucene.query.QueryResult;
import org.springframework.batch.core.JobParametersInvalidException;
import org.springframework.batch.core.launch.JobExecutionNotRunningException;
import org.springframework.batch.core.launch.NoSuchJobException;
import org.springframework.batch.core.launch.NoSuchJobExecutionException;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
import org.springframework.batch.core.repository.JobRestartException;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class IndexConfigContextTest {

	private static ClassPathXmlApplicationContext ctx;

	/**
	 * @param args
	 * @throws IOException 
	 * @throws JobParametersInvalidException 
	 * @throws JobInstanceAlreadyCompleteException 
	 * @throws JobRestartException 
	 * @throws JobExecutionAlreadyRunningException 
	 * @throws NoSuchJobException 
	 * @throws JobExecutionNotRunningException 
	 * @throws NoSuchJobExecutionException 
	 */
	public static void main(String[] args) throws Exception  {
		ctx = new ClassPathXmlApplicationContext(new String[] {"base-index-config/base-index-parameters.xml"});
		IndexConfig indexConfig = (IndexConfig) ctx.getBean("baseIndexConfig"); 
		System.out.println(indexConfig.getVersion());
		System.out.println(indexConfig.getOpenMode());
		System.out.println(indexConfig.getAnalyzerType());
		System.out.println(indexConfig.getIndexType());
	}

}
